package com.st.common.controller;

import com.st.common.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

/**
 * Created by jiangfj17321 on 2017/11/6.
 */
@Controller
public class BaseController {

    @Resource
    UserService userService;

    @RequestMapping("/*")
    public ModelAndView userIndex1(){
        String user_id = "admin";
        System.out.println(userService.getUserById(user_id));
        return new ModelAndView("index");
    }

    @RequestMapping("/dist/web/**")
    public ModelAndView userIndex(){
        String user_id = "admin";
        System.out.println(userService.getUserById(user_id));
        return new ModelAndView("index");
    }
}
